<div class="col-12" >
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{.label}}</h3>

            <div class="card-tools">

                <div class="input-group input-group-sm" style="width: 250px;">
                    <a  class="btn btn-success btn-sm"  data-toggle="modal" data-target="#addDictModal">
                        <i class="fa fa-plus "></i>
                    </a>
                    <input id="search-dict" type="text" name="table_search" class="form-control float-right" placeholder="Search" value="{{ .key }}">
                    <div class="input-group-append">
                        <a type="submit" class="btn btn-default" id="search-dict-a">
                            <i class="fa fa-search" style="color: grey"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.card-header -->
        <div class="card-body table-responsive p-0">
            <table class="table table-hover text-nowrap ">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>键</th>
                    <th>备注</th>
                    <th>值</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{ range  .dict_list }}
                <tr>
                    <td>{{ .ID }}</td>
                    <td>{{ .DictKey }}</td>
                    <td>{{ .DictMsg }}</td>
                    <td>{{ .DictVal }}</td>
                    <td>
                        <a class="btn btn-xs btn-info" dictid="{{ .ID }}" name="edit-dict"  data-toggle="tooltip" data-placement="top" title="修改">
                            <span class="fa fa-edit"></span>
                        </a>

                        <a class="btn btn-xs btn-danger" dictid="{{ .ID }}" name="del-dict" data-toggle="tooltip" data-placement="top" title="删除">
                            <span class="fa fa-trash"></span>
                        </a>
                    </td>
                </tr>

                {{end}}

                </tbody>
            </table>
        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">
            <ul class="pagination pull-right" style="margin-right: 50px">
                {{if eq $.page.CurPage 1 }}
                    <li class="page-item disabled"><a class="page-link" href="/log/user/1/">首页</a></li>
                    <li class="page-item disabled"><a class="page-link disabled" href="/log/user/{{ Sub $.page.CurPage 1 }}/">上一页</a></li>
                {{ else }}
                    <li class="page-item"><a class="page-link" href="/log/user/1/">首页</a></li>
                    <li class="page-item"><a class="page-link" href="/log/user/{{ Sub $.page.CurPage 1 }}/">上一页</a></li>
                {{ end }}
                </li>

                {{range $k,$v:=.page.Nums}}
                    <li class="page-item"><a class="page-link {{if eq $v $.page.CurPage}}active{{end}}" href="/log/user/{{$v}}/">{{ $v }}</a></li>
                    </li>
                {{end}}

                {{if eq $.page.CurPage .page.PageCount }}
                    <li class="page-item disabled"><a class="page-link" href="/log/user/{{ Add $.page.CurPage 1 }}/">下一页</a></li>
                    <li class="page-item disabled"><a class="page-link" href="/log/user/{{.page.PageCount }}/">尾页</a></li>
                {{ else }}
                    <li class="page-item"><a class="page-link" href="/log/user/{{ Add $.page.CurPage 1 }}/">下一页</a></li>
                    <li class="page-item"><a class="page-link" href="/log/user/{{.page.PageCount }}/">尾页</a></li>
                {{ end }}
            </ul>
        </div>
    </div>
    <!-- /.card -->
</div>

<!--模态框-->
<!--添加-->
<div class="modal fade" id="addDictModal" tabindex="-1" role="dialog" aria-labelledby="addDictModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="addDictModalLabel">添加</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row">
                    <label  class="col-sm-3">Key</label>
                    <input type="text" class="form-control my-radius" placeholder="键" id="key">
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3">Value</label>
                    <input type="text" class="form-control my-radius" placeholder="值" id="val">
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3">备注</label>
                    <input type="text" class="form-control my-radius" placeholder="备注" id="msg">
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="add-dict-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/添加角色-->

<!--修改角色-->
<div class="modal fade" id="editDictModal" tabindex="-1" role="dialog" aria-labelledby="editDictModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="editDictModalLabel">修改</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row">
                    <label  class="col-sm-3">Key</label>
                    <input type="text" class="form-control my-radius" placeholder="键" id="edit-key">
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3">Value</label>
                    <input type="text" class="form-control my-radius" placeholder="值" id="edit-val">
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3">备注</label>
                    <input type="text" class="form-control my-radius" placeholder="备注" id="edit-msg">
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="edit-dict-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/修改角色-->

<!--/模态框-->

